import axios from 'axios'
import qs from 'qs'


// 获取面试宝典列表
export function getLists(data) {
    return axios({
        url: 'http://localhost:1111/msbd/list',
        method: 'get',
        params: { ...data }
    })
}

//新增or修改
export function getSaves(row) {
    return axios({
        url: `http://localhost:1111/msbd/${row.id ? 'update' : 'save'}`,
        method: 'post',
        data: qs.stringify(row)
    })
}

//删除
export function removesFn(ids) {
    return axios({
        url: `http://localhost:1111/msbd/delete`,
        method: 'get',
        params: { id: ids }
    })
}
//获取类别列表
export function getClassifyList() {
    return axios({
        url: 'http://localhost:1111/classify/list',
        method: 'get',
        params: {}
    })
}